package com.dudy.singleton;

/**
 * @program: zhuguangDemo
 * @description: ${description}
 * @author: dudy
 * @create: 2018-04-05 20:27
 **/
public class Singleton {
    private static Singleton singleton;
    private Singleton() {

    }

    private static class inncerClass {
        private static Singleton singleton = new Singleton();
    }

    public static Singleton getInstance() {
        if (singleton == null) {
            singleton = inncerClass.singleton;
        }
        return singleton;
    }
}
